package squares;

import org.junit.Before;
import org.junit.Test;

import squares.Square.TemperatureType;

import borders.Open;
import borders.Wall;


public class RockSquareTest {
	
	private static RockSquare rock1;
	@Before
	public void setUp() throws Exception {
		Square.setMinTemperature(-200, TemperatureType.CELSIUS);
		Square.setMaxTemperature(5000,TemperatureType.CELSIUS);
		rock1 = new RockSquare();
	
		}
	@Test
	public final void Contructor_legalCase()
	{
		RockSquare rockSquare = new RockSquare();
		assert(rockSquare.getHumidity() == 0);
		assert(rockSquare.getTemperature() == 0);
		assert(rockSquare.teleportpossible() == false);
		for(Direction direction : Direction.values())
		{
			assert(rockSquare.getBorderAt(direction) instanceof Wall);
		}
	}
	@Test
	public final void BorderCanBeChanged()
	{
		assert(rock1.BorderCanBeChanged(Direction.NORTH,new Wall(rock1,false)));
		assert(!rock1.BorderCanBeChanged(Direction.SOUTH,new Open(rock1)));
	}

}
